<script setup lang="ts">
import {
  MainSearchInput
} from "./MockData";

import house from "@/assets/house.png";

import {Search} from "@element-plus/icons-vue";
</script>

<template>
  <div class="show-mains">

    <!--  Search  -->
    <div style="display: flex; gap: 25px;">
      <el-input
          v-model="MainSearchInput"
          class="MainSearchInput"
          placeholder="请输入搜索内容"
          prefix-icon="Search"
      />
      <el-button class="MainSearchButton">搜索房源</el-button>
    </div>

    <!--  hot house recommend  -->
    <div class="HotHouseRecommend">

      <div style="display: flex; align-items: center">
        <el-image :src="house" fit="fill" class="hothouse"/>
        <div style="display: flex; flex-direction: column; gap: 30px;">
          <span style="color: #2f3e4e; font-size: 2.5rem; font-weight: bold;">热门房源推荐</span>
          <div style="display: flex; flex-direction: column;">
            <span style="color: #2f3e4e;">描述1</span>
            <span style="color: #2f3e4e;">描述2</span>
          </div>
          <el-button class="gotolook">了解一下</el-button>
        </div>
      </div>

      <div class="HotTable">
        <span style="color: #ff7043; font-weight: bold; font-size: 1.2rem;">热门房推荐</span>
      </div>

    </div>

    <!--  house recommend  -->
    <div class="HouseRecommend">
      <div class="recommendBox">
        <el-image fit="fill" :src="house" style="width: 102px; height: 96px;" />
        <div style="display: flex; flex-direction: column; gap: 5px;">
          <span style="font-weight: bold;">房源样例</span>
          <div style="display: flex; flex-direction: column; gap: 15px;">
            <span style="color: #909399; font-size: .8rem">房源简介</span>
            <span style="color: #ff7043">9999</span>
          </div>
        </div>
      </div>
      <div class="recommendBox">
        <el-image fit="fill" :src="house" style="width: 102px; height: 96px;" />
        <div style="display: flex; flex-direction: column; gap: 5px;">
          <span style="font-weight: bold;">房源样例</span>
          <div style="display: flex; flex-direction: column; gap: 15px;">
            <span style="color: #909399; font-size: .8rem">房源简介</span>
            <span style="color: #ff7043">9999</span>
          </div>
        </div>
      </div>
      <div class="recommendBox">
        <el-image fit="fill" :src="house" style="width: 102px; height: 96px;" />
        <div style="display: flex; flex-direction: column; gap: 5px;">
          <span style="font-weight: bold;">房源样例</span>
          <div style="display: flex; flex-direction: column; gap: 15px;">
            <span style="color: #909399; font-size: .8rem">房源简介</span>
            <span style="color: #ff7043">9999</span>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<style scoped>

.HouseRecommend {
  display: flex;
  gap: 20px;
}

.recommendBox {
  width: 320px;
  height: 180px;
  display: flex;
  gap: 15px;
  align-items: center;
  background-color: aliceblue;
  border-radius: 20px;
}

.HotTable {
  width: 260px;
  height: 384px;
  background-color: aliceblue;
  border-radius: 30px;
  padding: 20px;
}

.gotolook {
  background-color: transparent;
  border-radius: 30px;
  height: 30px;
  width: 100px;
  color: #2f3e4e;
  border: solid 1px #2f3e4e;
}

.HotHouseRecommend {
  display: flex;
  align-items: center;
  gap: 50px;
}

.MainSearchInput {
  height: 50px;
  width: 820px;
}

.MainSearchButton {
  height: 50px;
  width: 150px;
  border-radius: 20px;
  background-color: #409EFF;
  color: aliceblue;
}

:deep(.el-input__wrapper) {
  border-radius: 20px;
}

.hothouse {
  width: 408px;
  height: 384px;
}

.show-mains {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
  gap: 50px;
  height: calc(100vh - 85px - 40px);
  background: linear-gradient(to bottom, #a6dcff, #b2f0de);
}
</style>
